<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <table border="1" align="center">
        <tr><td>编号</td><td>书名</td><td>价格</td></tr>
        <tr v-for="(book,index) in books" :key="index">
            <td>{{book.id}}</td><td>{{book.name}}</td><td>{{book.price}}</td>
        </tr>
    </table>
</div>
<script src="js/vue-2.6.12.js"></script>
<script src="js/axios-0.21.0.js"></script>
<script>
    new Vue({
        el:"#app",
        data:{
            books:[]
        },
        created(){
            axios({
                method:"post",
                url:"book/selectAll.do"
            }).then((resp)=>{
                this.books=resp.data;
            })
        }
    });
</script>
</body>
</html>